#!/usr/bin/env python
# encoding: utf-8
'''
@author: wangjianrong
@software: pycharm
@file: path_op.py
@time: 2020/9/22 13:43
@desc:
'''

import os
import shutil

def makedirs(dst_folder,delete=False):
    '''
    创建文件路径，如果delete为True且目标路径存在，则先删除再创建
    :param dst_folder:
    :param delete:
    :return:
    '''
    if os.path.exists(dst_folder) and delete:
        shutil.rmtree(dst_folder)
    os.makedirs(dst_folder,exist_ok=True)